package com.meta.nd.vo;


import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class NdCompareResult {
    public static final String ADD = "1";
    public static final String REMOVE= "2";
    public static final String NO_CHANGE = "3";
    String operation;
    String ndCode;
    String finalNdName;
    List<FdCompareResult> fdCompareResults = new ArrayList<>();
    List<NdCompareResult> children = new ArrayList<>();
    public NdCompareResult(String ndCode,String finalNdName){
        this.ndCode = ndCode;
        this.finalNdName = finalNdName;
    }
    public List<NdCompareResult> getAllNdCompareResults(){
        List<NdCompareResult> results = new ArrayList<>();
        results.add(this);
        for( NdCompareResult child : children )
            results.addAll(child.getAllNdCompareResults());
        return results;
    }
}
